package com.bit.ioc.controller;

import jakarta.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:
 * Date: 2025-11-20
 * Time: 20:54
 */

//@RequestMapping("/prop")
//@ResponseBody
//@Controller
//public class PropertiesController {
//
//
//    @Value("${my.key}")
//    private String myKey;
//
//    @Value("${my.key2}")
//    private boolean myKey2;
//
//    @RequestMapping("/read")
//    public String readValue(){
//         return "读取配置文件my.key" +  myKey;
//    }
//
//    //初始化注解，分配内存，实例化，初始化
//    @PostConstruct
//    public void init(){
//        System.out.println("mykey2 ：" + myKey2);
//    }
//}
